import request from '@/utils/request'

// 查询计划详情列表
export function listIncome(query) {
  return request({
    url: '/income/income/list',
    method: 'get',
    params: query
  })
}

// 查询计划详情详细
export function getIncome(id) {
  return request({
    url: '/income/income/' + id,
    method: 'get'
  })
}

// 新增计划详情
export function addIncome(data) {
  return request({
    url: '/income/income',
    method: 'post',
    data: data
  })
}

// 修改计划详情
export function updateIncome(data) {
  return request({
    url: '/income/income',
    method: 'put',
    data: data
  })
}

// 删除计划详情
export function delIncome(id) {
  return request({
    url: '/income/income/' + id,
    method: 'delete'
  })
}

// 修改计划详情
export function payBillToIncome(data) {
  return request({
    url: '/income/income/payBillToIncome',
    method: 'post',
    data: data
  })
}


// 查询账单详细
export function getSm() {
  return request({
    url: '/income/income/sumIncome',
    method: 'get'
  })
}

// 查询账单详细
export function getySm() {
  return request({
    url: '/income/income/sumIncome?ty=2',
    method: 'get'
  })
}

// 查询账单详细
export function getZjSm() {
  return request({
    url: '/income/income/sumIncome?ty=1',
    method: 'get'
  })
}
